package ex5;

public class Monkey {
    private String name;
    private double weigh;//体重
    private int age;//年龄
    private static String hobby="吃香蕉";//爱好

    public Monkey(){

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeigh() {
        return weigh;
    }

    public void setWeigh(double weigh) {
        this.weigh = weigh;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static String getHobby() {
        return hobby;
    }

    public static void setHobby(String hobby) {
        Monkey.hobby = hobby;
    }

    public Monkey(String name,double weigh,int age) {
        this.weigh = weigh;
        this.name = name;
        this.age = age;
    }
    public void climbTree(double high){
        System.out.println(name +"会爬树"+","+"能爬:"+high+"米" );
    }

}

